package com.dla.streaming;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.opengl.GLSurfaceView;
import android.os.Bundle;
import android.os.SystemClock;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

import com.ksyun.media.streamer.capture.CameraCapture;
import com.ksyun.media.streamer.filter.imgtex.ImgTexFilterMgt;
import com.ksyun.media.streamer.kit.KSYStreamer;
import com.ksyun.media.streamer.kit.StreamerConstants;

public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void start(View v){
        BaseCameraActivity.BaseStreamConfig config = new BaseCameraActivity.BaseStreamConfig();
        config. mUrl ="rtmp://139.9.197.101:1935/live/liveApp";
        config. mCameraFacing = 1;
        config. mFrameRate = 15.0f;
        config. mVideoKBitrate = 800;
        config. mAudioKBitrate = 48;
        config. mTargetResolution = 0;
        config. mOrientation =1;
        config. mEncodeMethod = 3;
        config. mAutoStart =false;
        config. mShowDebugInfo= true;

        BaseCameraActivity.startActivity(this,config,BaseCameraActivity.class);
//        Intent intent = new Intent(this,BaseCameraActivity.class);
//        intent.putExtra("config",new BaseStreamConfig().toJson());
//        startActivity(intent);
    }
}
